cov Cs Gauss-width is 7099985711148818.0

err Cs Gauss-width is 84261412.94298843

cov Cs Lorentz-width is 1.286919521399306e+19

err Cs Lorentz-width is 3587366055.198864

cov Cs Peak-Height is 6.620292024106142e+19

err Cs Peak-Height is 8136517697.458872

cov Cs Peak-freq or Gauss-mean is 6.334991242150323e+16

err Cs Peak-freq or Gauss-mean is 251694084.99506545

cov Cs Height-Shifting is 112560272834.16861

err Cs Height-Shifting is 335500.0340300558

cov Cs Gradient is 21.43247534671542

err Cs Gradient is 4.629522151012502

[ 4.75257812e+02 5.86759914e+01 1.80972799e+01 5.19699832e+00

-1.05920135e-02]

cov Cs Gauss-mean is 16.97382169471971

err Cs Gauss-mean is 4.119929816722575

cov Cs Sigma :- Gauss-width is 134.5416456713787

err Cs Sigma :- Gauss-width is 11.599208838165588

cov Cs Peak-Height is 12.181481469736077

err Cs Peak-Height is 3.490197912688631

cov Cs Peak-freq or Gauss-mean is 151.0261898238308

err Cs Peak-freq or Gauss-mean is 12.289271330059842

C:\Users\imman\Documents\ICL\Year 3\Term 1\Term 2 Labs\Cycle 1\Monte Carlo Final Immanuel1www.py:1107: RuntimeWarning: divide by zero encountered in true_divide

fitsCs3V,covsCs3 = curve_fit(voi, A3, sCsp3,[50,50,30,470,0,0], sigma=1/(np.abs(sCsp3)**0.5))

C:\Users\imman\Documents\ICL\Year 3\Term 1\Term 2 Labs\Cycle 1\Monte Carlo Final Immanuel1www.py:134: RuntimeWarning: overflow encountered in exp

w=np.exp(-z**2)*sps.erfc(-1j*z) # -?erfc = 1 - erf = complementary error function

C:\Users\imman\Documents\ICL\Year 3\Term 1\Term 2 Labs\Cycle 1\Monte Carlo Final Immanuel1www.py:134: RuntimeWarning: invalid value encountered in multiply

w=np.exp(-z**2)*sps.erfc(-1j*z) # -?erfc = 1 - erf = complementary error function

C:\Users\imman\Documents\ICL\Year 3\Term 1\Term 2 Labs\Cycle 1\Monte Carlo Final Immanuel1www.py:1139: RuntimeWarning: divide by zero encountered in true_divide

fitsCs3,covsCs3 = curve_fit(nor, A3, sCsp3,[500,3,30,0,-0.05], sigma=1/((np.abs(sCsp3)**0.5)))


5.409632189810323

the peak for 45 degree is at 470.21±5.41

fit 1/E vs Costheta is [-1.32435100e+13 2.26848015e+13]


variance [-9.68692375e+09 1.65927268e+10] sd [ 98422.17102717 128812.75855527]

ideal energy 662.0

s 0.124125

experiment, U,S,A,M [ 660.04266846 32.36903431 1246.74654474 98.08162983]

1.1108405956466456

2.2751495651736677

2491.8757053079958

39.662513081945505

simulation, U,S,A,M [6.57510254e+02 3.49608338e+01 1.41487962e+03 2.10194450e-01]

0.009045416237424586

0.0189775363580775

22.585674934844523

0.7261668990745906


ideal energy 614.027191045605

experiment, U,S,A,M [ 5.95336484e+02 3.72035367e+01 9.29275335e+00 -2.38537102e-02]

11.771828092204478

26.606379568291953

1.149022843972938

0.09550713893717655

experiment, U,S,A,M [ 5.95336484e+02 3.72035367e+01 9.29275335e+00 -2.38537102e-02]

11.771828092204478

26.606379568291953

1.149022843972938

0.09550713893717655

simulation, U,S,A,M [ 5.57663405e+02 -1.81456554e+00 7.92639318e-01 4.23076912e-01]

2.6280108882939044e+16

-2.6342494601195654e+17

2119299712287723.0

0.022868872577845468



ideal energy 564.0936698117453

experiment, U,S,A,M [ 5.37441512e+02 -6.38796658e+01 5.90090740e+00 9.32232604e-02]

52.04617436731901

173.49737894168013

0.8288681413965577

0.31093527677638805

simulation, U,S,A,M [ 5.55799087e+02 3.74221269e+01 5.30924463e+00 -1.01033399e-02]

3.9268039652508535

8.269984567486771

0.1206443189731646

0.004190088894032637



ideal energy 479.9038875573161

experiment, U,S,A,M [470.07978443 53.36384816 16.52999883 -0.60503229]

9.129257822361456

25.022132546484308

1.4804813315909855

0.30281296117726525

simulation, U,S,A,M [ 4.77865666e+02 2.79498958e+01 1.79518415e+01 -1.01680000e-02]

0.22642417828009945

0.47008556682273517

0.1418853270907312

0.0035553693361618935



C:\Users\imman\Documents\ICL\Year 3\Term 1\Term 2 Labs\Cycle 1\Monte Carlo Final Immanuel1www.py:1672: IntegrationWarning: The algorithm does not converge. Roundoff error is detected

in the extrapolation table. It is assumed that the requested tolerance

cannot be achieved, and that the returned result (if full_output = 1) is

the best which can be obtained.

norm=spi.quad(sec,0,sp.pi,args=662)

(-57445506566.921486, 125602084473.85092)





len dispa vs len disnew 10000 10000

len of dist. of e- Energies and dispa resp. are 10000 10000






diste Zero point is 4991

cuttoff photon energy-value dispa[777] point is, 499.0

newdistex is extension of Cross-section Newdist-Photons

count of Zeros in newdistex is 1844

dispa count is index (from newdistex Zeros count is) 184.4

len photopeak 10000

len shift 10000



len dispa 10000

Traceback (most recent call last):


File "C:\Users\imman\Documents\ICL\Year 3\Term 1\Term 2 Labs\Cycle 1\Monte Carlo Final Immanuel1www.py", line 2193, in <module>

noise=-2**0.5*s*sps.erfinv(1-2*sp.array(randseed))


KeyboardInterrupt



In [32]: runfile('C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1/Monte Carlo Final Alone-Immanuel.py', wdir='C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1')

len dispa vs len disnew 10000 10000

len of dist. of e- Energies and dispa resp. are 10000 10000


diste Zero point is 4991

cuttoff photon energy-value dispa[777] point is, 499.0

newdistex is extension of Cross-section Newdist-Photons

count of Zeros in newdistex is 1844

dispa count is index (from newdistex Zeros count is) 184.4



len dispa 10000

n is 1194

n is 599

n is 472

n is 9000

ideal energy 662.0

s 0.124125



In [33]: runfile('C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1/Monte Carlo Final Alone-Immanuel2.py', wdir='C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1')

len dispa vs len disnew 10000 10000

len of dist. of e- Energies and dispa resp. are 10000 10000


diste Zero point is 4991

cuttoff photon energy-value dispa[777] point is, 499.0

newdistex is extension of Cross-section Newdist-Photons

count of Zeros in newdistex is 1844

dispa count is index (from newdistex Zeros count is) 184.4



len dispa 10000

n is 1194

n is 599

n is 472

n is 9000

ideal energy 662.0

s 0.124125



In [34]: runfile('C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1/Monte Carlo Final Alone-Immanuel2.py', wdir='C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1')

len dispa vs len disnew 10000 10000

len of dist. of e- Energies and dispa resp. are 10000 10000


diste Zero point is 4991

cuttoff photon energy-value dispa[777] point is, 499.0

newdistex is extension of Cross-section Newdist-Photons

count of Zeros in newdistex is 1844

dispa count is index (from newdistex Zeros count is) 184.4



len dispa 10000

n is 1194

n is 599

n is 472

n is 9000

ideal energy 662.0

s 0.124125



In [35]: runfile('C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1/Monte Carlo Final Alone-Immanuel2.py', wdir='C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1')

len dispa vs len disnew 10000 10000

len of dist. of e- Energies and dispa resp. are 10000 10000

Traceback (most recent call last):


File "C:\Users\imman\Documents\ICL\Year 3\Term 1\Term 2 Labs\Cycle 1\Monte Carlo Final Alone-Immanuel2.py", line 201, in <module>

plt.plot(dispa, sp.array(newdist + diste), 'r-')


File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\pyplot.py", line 2761, in plot

return gca().plot(


File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\axes\_axes.py", line 1647, in plot

lines = [*self._get_lines(*args, data=data, **kwargs)]


File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\axes\_base.py", line 216, in __call__

yield from self._plot_args(this, kwargs)


File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\axes\_base.py", line 342, in _plot_args

raise ValueError(f"x and y must have same first dimension, but "


ValueError: x and y must have same first dimension, but have shapes (10000,) and (20000,)




In [36]: runfile('C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1/Monte Carlo Final Alone-Immanuel2.py', wdir='C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1')

len dispa vs len disnew 10000 10000

len of dist. of e- Energies and dispa resp. are 10000 10000


diste Zero point is 4991

cuttoff photon energy-value dispa[777] point is, 499.0

newdistex is extension of Cross-section Newdist-Photons

count of Zeros in newdistex is 1844

dispa count is index (from newdistex Zeros count is) 184.4



len dispa 10000

n is 1194

n is 599

n is 472

n is 9000

ideal energy 662.0

s 0.124125



In [37]: runfile('C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1/Monte Carlo Final Alone-Immanuel2.py', wdir='C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1')

len dispa vs len disnew 10000 10000

len of dist. of e- Energies and dispa resp. are 10000 10000


diste Zero point is 4991

cuttoff photon energy-value dispa[777] point is, 499.0

newdistex is extension of Cross-section Newdist-Photons

count of Zeros in newdistex is 1844

dispa count is index (from newdistex Zeros count is) 184.4



len dispa 10000

n is 599

n is 472

n is 9000

ideal energy 662.0

s 0.124125



In [38]: runfile('C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1/Monte Carlo Final Alone-Immanuel2.py', wdir='C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1')

len dispa vs len disnew 10000 10000

len of dist. of e- Energies and dispa resp. are 10000 10000


diste Zero point is 4991

cuttoff photon energy-value dispa[777] point is, 499.0

newdistex is extension of Cross-section Newdist-Photons

count of Zeros in newdistex is 1844

dispa count is index (from newdistex Zeros count is) 184.4



len dispa 10000

n is 599

n is 472

n is 9000

ideal energy 662.0

s 0.124125



In [39]: runfile('C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1/Monte Carlo Final Alone-Immanuel2.py', wdir='C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1')

len dispa vs len disnew 10000 10000

len of dist. of e- Energies and dispa resp. are 10000 10000


diste Zero point is 4991

cuttoff photon energy-value dispa[777] point is, 499.0

newdistex is extension of Cross-section Newdist-Photons

count of Zeros in newdistex is 1844

dispa count is index (from newdistex Zeros count is) 184.4



len dispa 10000

n is 599

n is 472

n is 9000

ideal energy 662.0

s 0.124125



In [40]: runfile('C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1/Monte Carlo Final Alone-Immanuel2.py', wdir='C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1')

len dispa vs len disnew 10000 10000

len of dist. of e- Energies and dispa resp. are 10000 10000


diste Zero point is 4991

cuttoff photon energy-value dispa[777] point is, 499.0

newdistex is extension of Cross-section Newdist-Photons

count of Zeros in newdistex is 1844

dispa count is index (from newdistex Zeros count is) 184.4



len dispa 10000

n is 599

n is 472

n is 9000

ideal energy 662.0

s 0.124125



In [41]: runfile('C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1/Monte Carlo Final Alone-Immanuel2.py', wdir='C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1')

len dispa vs len disnew 10000 10000

len of dist. of e- Energies and dispa resp. are 10000 10000


diste Zero point is 4991

cuttoff photon energy-value dispa[777] point is, 499.0

newdistex is extension of Cross-section Newdist-Photons

count of Zeros in newdistex is 1844

dispa count is index (from newdistex Zeros count is) 184.4



len dispa 10000

n is 599

n is 472

n is 9000

ideal energy 662.0

s 0.124125



In [42]: runfile('C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1/Monte Carlo Final Alone-Immanuel2.py', wdir='C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1')

len dispa vs len disnew 10000 10000

len of dist. of e- Energies and dispa resp. are 10000 10000


diste Zero point is 4991

cuttoff photon energy-value dispa[777] point is, 499.0

newdistex is extension of Cross-section Newdist-Photons

count of Zeros in newdistex is 1844

dispa count is index (from newdistex Zeros count is) 184.4



len dispa 10000

n is 599

n is 472

n is 9000

ideal energy 662.0

s 0.124125



In [43]: runfile('C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1/Monte Carlo Final Alone-Immanuel2.py', wdir='C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1')

len dispa vs len disnew 10000 10000

len of dist. of e- Energies and dispa resp. are 10000 10000


diste Zero point is 4991

cuttoff photon energy-value dispa[777] point is, 499.0

newdistex is extension of Cross-section Newdist-Photons

count of Zeros in newdistex is 1844

dispa count is index (from newdistex Zeros count is) 184.4



len dispa 10000

n is 599

n is 472

n is 9000

ideal energy 662.0

s 0.124125



In [44]: runfile('C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1/Monte Carlo Final Alone-Immanuel2.py', wdir='C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1')

len dispa vs len disnew 10000 10000

len of dist. of e- Energies and dispa resp. are 10000 10000


diste Zero point is 4991

cuttoff photon energy-value dispa[777] point is, 499.0

newdistex is extension of Cross-section Newdist-Photons

count of Zeros in newdistex is 1844

dispa count is index (from newdistex Zeros count is) 184.4



len dispa 10000

n is 599

n is 472

n is 9000

ideal energy 662.0

s 0.124125



In [45]: runfile('C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1/Monte Carlo Final Alone-Immanuel2.py', wdir='C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1')

len dispa vs len disnew 10000 10000

len of dist. of e- Energies and dispa resp. are 10000 10000


diste Zero point is 4991

cuttoff photon energy-value dispa[777] point is, 499.0

newdistex is extension of Cross-section Newdist-Photons

count of Zeros in newdistex is 1844

dispa count is index (from newdistex Zeros count is) 184.4



len dispa 10000

n is 599

n is 472

n is 9000

ideal energy 662.0

s 0.124125



In [46]: runfile('C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1/Monte Carlo Final Alone-Immanuel2.py', wdir='C:/Users/imman/Documents/ICL/Year 3/Term 1/Term 2 Labs/Cycle 1')

len dispa vs len disnew 10000 10000

len of dist. of e- Energies and dispa resp. are 10000 10000


diste Zero point is 4991

cuttoff photon energy-value dispa[777] point is, 499.0

newdistex is extension of Cross-section Newdist-Photons

count of Zeros in newdistex is 1844

dispa count is index (from newdistex Zeros count is) 184.4



len dispa 10000

n is 599

n is 472

n is 9000

ideal energy 662.0

s 0.124125



In [47]: